#!/bin/sh

VALGRIND=`which valgrind 2>/dev/null`

if [[ -e $VALGRIND ]]; then
	echo Running with valgrind.
else
	echo Unable to find valgrind. Please install it.
	exit 1
fi

LD_LIBRARY_PATH=../libcpq/ $VALGRIND --tool=memcheck ./cpq $@
